package behavior.state;

public class Activity {
    private State state;
    private int prizeCount = 0;

    State noRaffleState = new NoRaffleState(this);
    State canRaffleState = new CanRaffleState(this);
    State dispenseState = new DispenseState(this);
    State dispenseOutState = new DispenseOutState(this);

    public int getPrizeCount() {

        return prizeCount--;
    }

    public void setPrizeCount(int prizeCount) {
        this.prizeCount = prizeCount;
    }

    public Activity(int prizeCount) {
        this.prizeCount = prizeCount;
        state = new NoRaffleState(this);
    }

    void setState(State state){
        this.state = state;
    }

    void deductMoney(){
        state.deduceMoney();
    }
    void raffle(){
        if(state.raffle()){
            state.dispensePrize();
        }
    }
}
